package com.ververica.cdc.guass.source.hybrid;

public class HybridSourceEnumeratorState  {

    //currentSourceIndex 表示当前的源索引,wrappedState 是通过 snapshotWrappedState()
    //方法获取的当前 pendingSplits 的序列化状态
    private final int currentSourceIndex;
    private byte[] wrappedStateBytes;
    private final int wrappedStateSerializerVersion;

    public HybridSourceEnumeratorState(
        int currentSourceIndex, byte[] wrappedStateBytes, int wrappedStateSerializerVersion) {
    this.currentSourceIndex = currentSourceIndex;
    this.wrappedStateBytes = wrappedStateBytes;
    this.wrappedStateSerializerVersion = wrappedStateSerializerVersion;
}

    public int getCurrentSourceIndex() {
        return this.currentSourceIndex;
    }

    public byte[] getWrappedState() {
        return wrappedStateBytes;
    }

    //getWrappedStateSerializerVersion() 返回当前的序列化器版本。
    public int getWrappedStateSerializerVersion() {
        return wrappedStateSerializerVersion;
    }
}

